home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / ppc-amigaos / lib / ldscripts / elf32ppc.xs < prev    next >
Text File  |  1997-09-16  |  4KB  |  127 lines

  1. OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
  2.           "elf32-powerpc")
  3. OUTPUT_ARCH(powerpc)
  4. ENTRY(_start)
  5. SEARCH_DIR(/ade/os-lib); SEARCH_DIR(/ade/lib); SEARCH_DIR(/ade/ppc-amigaos/lib);
  6. /* Do we need any of these for elf?
  7.    __DYNAMIC = 0;    */
  8. PROVIDE (__stack = 0);
  9. SECTIONS
  10. {
  11.   /* Read-only sections, merged into text segment: */
  12.   . = SIZEOF_HEADERS;
  13.   .hash          : { *(.hash)        }
  14.   .dynsym      : { *(.dynsym)        }
  15.   .dynstr      : { *(.dynstr)        }
  16.   .rela.text      : { *(.rela.text)     }
  17.   .rela.data      : { *(.rela.data)     }
  18.   .rela.rodata      : { *(.rela.rodata)     }
  19.   .rela.got      : { *(.rela.got)    }
  20.   .rela.got1      : { *(.rela.got1)    }
  21.   .rela.got2      : { *(.rela.got2)    }
  22.   .rela.ctors      : { *(.rela.ctors)    }
  23.   .rela.dtors      : { *(.rela.dtors)    }
  24.   .rela.init      : { *(.rela.init)    }
  25.   .rela.fini      : { *(.rela.fini)    }
  26.   .rela.bss      : { *(.rela.bss)    }
  27.   .rela.plt      : { *(.rela.plt)    }
  28.   .rela.sdata      : { *(.rela.sdata2)    }
  29.   .rela.sbss      : { *(.rela.sbss2)    }
  30.   .rela.sdata2      : { *(.rela.sdata2)    }
  31.   .rela.sbss2      : { *(.rela.sbss2)    }
  32.   .plt   : { *(.plt) }
  33.   .text      :
  34.   {
  35.     *(.text)
  36.     /* .gnu.warning sections are handled specially by elf32.em.  */
  37.     *(.gnu.warning)
  38.   } =0
  39.   .init          : { *(.init)        } =0
  40.   .fini          : { *(.fini)        } =0
  41.   .rodata      : { *(.rodata)  }
  42.   .rodata1      : { *(.rodata1) }
  43.   _etext = .;
  44.   PROVIDE (etext = .);
  45.   /* Adjust the address for the data segment.  We want to adjust up to
  46.      the same address within the page on the next page up.  It would
  47.      be more correct to do this:
  48.        . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
  49.      The current expression does not correctly handle the case of a
  50.      text segment ending precisely at the end of a page; it causes the
  51.      data segment to skip a page.  The above expression does not have
  52.      this problem, but it will currently (2/95) cause BFD to allocate
  53.      a single segment, combining both text and data, for this case.
  54.      This will prevent the text segment from being shared among
  55.      multiple executions of the program; I think that is more
  56.      important than losing a page of the virtual address space (note
  57.      that no actual memory is lost; the page which is skipped can not
  58.      be referenced).  */
  59.   . =  ALIGN(8) + 0x40000;
  60.   .data    :
  61.   {
  62.     *(.data)
  63.     CONSTRUCTORS
  64.   }
  65.   .data1   : { *(.data1) }
  66.   .got1          : { *(.got1) }
  67.   .dynamic      : { *(.dynamic) }
  68.   /* Put .ctors and .dtors next to the .got2 section, so that the pointers
  69.      get relocated with -mrelocatable. Also put in the .fixup pointers.
  70.      The current compiler no longer needs this, but keep it around for 2.7.2  */
  71.         PROVIDE (_GOT2_START_ = .);
  72.   .got2          :  { *(.got2) }
  73.         PROVIDE (__CTOR_LIST__ = .);
  74.   .ctors      : { *(.ctors) }
  75.         PROVIDE (__CTOR_END__ = .);
  76.         PROVIDE (__DTOR_LIST__ = .);
  77.   .dtors      : { *(.dtors) }
  78.         PROVIDE (__DTOR_END__ = .);
  79.         PROVIDE (_FIXUP_START_ = .);
  80.   .fixup      : { *(.fixup) }
  81.         PROVIDE (_FIXUP_END_ = .);
  82.         PROVIDE (_GOT2_END_ = .);
  83.         PROVIDE (_GOT_START_ = .);
  84.   .got          : { *(.got) }
  85.   .got.plt      : { *(.got.plt) }
  86.   .sdata2   : { *(.sdata2) }
  87.   .sbss2   : { *(.sbss2) }
  88.         PROVIDE (_GOT_END_ = .);
  89.   /* We want the small data sections together, so single-instruction offsets
  90.      can access them all, and initialized data all before uninitialized, so
  91.      we can shorten the on-disk segment size.  */
  92.   .sdata      : { *(.sdata) }
  93.   _edata  =  .;
  94.   PROVIDE (edata = .);
  95.   .sbss      :
  96.   {
  97.     PROVIDE (__sbss_start = .);
  98.     *(.sbss)
  99.     *(.scommon)
  100.     PROVIDE (__sbss_end = .);
  101.   }
  102.   .bss       :
  103.   {
  104.    PROVIDE (__bss_start = .);
  105.    *(.dynbss)
  106.    *(.bss)
  107.    *(COMMON)
  108.   }
  109.   _end = . ;
  110.   PROVIDE (end = .);
  111.   /* These are needed for ELF backends which have not yet been
  112.      converted to the new style linker.  */
  113.   .stab 0 : { *(.stab) }
  114.   .stabstr 0 : { *(.stabstr) }
  115.   /* DWARF debug sections.
  116.      Symbols in the .debug DWARF section are relative to the beginning of the
  117.      section so we begin .debug at 0.  It's not clear yet what needs to happen
  118.      for the others.   */
  119.   .debug          0 : { *(.debug) }
  120.   .debug_srcinfo  0 : { *(.debug_srcinfo) }
  121.   .debug_aranges  0 : { *(.debug_aranges) }
  122.   .debug_pubnames 0 : { *(.debug_pubnames) }
  123.   .debug_sfnames  0 : { *(.debug_sfnames) }
  124.   .line           0 : { *(.line) }
  125.   /* These must appear regardless of  .  */
  126. }
  127.